<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: C:/code/SkyGameEngine2d/src/base/Rect.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">1.0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_0af1587c8378955de40f48b4bd1869f0.html">base</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Rect.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    Copyright (C) 2019 Zongming Liu &lt;1849059316@qq.com&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    This program is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">    it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    the Free Software Foundation; either version 2 of the License, or</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    (at your option) any later version.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    GNU General Public License for more details.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    You should have received a copy of the GNU General Public License along</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">    with this program; if not, write to the Free Software Foundation, Inc.,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#ifndef Rect_h__</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#define Rect_h__</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;d2d1.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;../utility/MacroTool.h&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;Vector.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;Size.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">namespace </span>SkyEngine2d</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keyword">class </span>Line;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html">   33</a></span>&#160;    <span class="keyword">class </span>SGE_API <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>();</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>(<span class="keywordtype">float</span> left_bottom_x, <span class="keywordtype">float</span> left_bottom_y, <span class="keywordtype">float</span> width, <span class="keywordtype">float</span> height);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>(<span class="keywordtype">float</span> left_bottom_x, <span class="keywordtype">float</span> left_bottom_y, <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; size);</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; left_bottom_pos, <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; size);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>&amp; rect);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordtype">void</span> move(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; dt);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <span class="keywordtype">void</span> move(<span class="keywordtype">float</span> x_dt, <span class="keywordtype">float</span> y_dt);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keywordtype">void</span> moveTo(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; pos);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordtype">void</span> moveTo(<span class="keywordtype">float</span> pos_x, <span class="keywordtype">float</span> pos_y);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordtype">bool</span> containPoint(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; point)<span class="keyword">const</span>;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordtype">bool</span> intersectWithLine(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_line.html">Line</a>&amp; line)<span class="keyword">const</span>;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keywordtype">bool</span> intersectsWithRect(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>&amp; rect)<span class="keyword">const</span>;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a>&amp; r)<span class="keyword">const</span>;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keyword">operator</span> D2D1_RECT_F();</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a9230d7720580dfcbb96558438283694f">  137</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a9230d7720580dfcbb96558438283694f">getLeft</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_left; }</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#aa582ce22e95cf069d31993a01bad1c8b">  143</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#aa582ce22e95cf069d31993a01bad1c8b">getRight</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_left + m_size.width; }</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a5c64f9f2dd9518afb2e86c2609239c90">  149</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a5c64f9f2dd9518afb2e86c2609239c90">getTop</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_bottom + m_size.height; }</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a1dbd956c536722d8c6f595977ea5272d">  155</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a1dbd956c536722d8c6f595977ea5272d">getBottom</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_bottom; }</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a4800f09e615e757cbdf8a68e3797fffc">  161</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> <a class="code" href="class_sky_engine2d_1_1_rect.html#a4800f09e615e757cbdf8a68e3797fffc">getBottomLeft</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>(m_left, m_bottom); }</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="comment">//！矩形的左上角的坐标 </span></div><div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a1ff859dc3515f209d8e95cbecb431638">  167</a></span>&#160;<span class="comment"></span>        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> <a class="code" href="class_sky_engine2d_1_1_rect.html#a1ff859dc3515f209d8e95cbecb431638">getTopLeft</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>(m_left, getTop()); }</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        </div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#aa974b273803b0c331fba4ec79cfdc639">  173</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> <a class="code" href="class_sky_engine2d_1_1_rect.html#aa974b273803b0c331fba4ec79cfdc639">getBottomRight</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>(getRight(), m_bottom); }</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a7524be9fdc3347959f5774f1aad31365">  179</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> <a class="code" href="class_sky_engine2d_1_1_rect.html#a7524be9fdc3347959f5774f1aad31365">getTopRight</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>(getRight(), getTop()); }</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#ae97111130e08708f229d3f8c23be5057">  186</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#ae97111130e08708f229d3f8c23be5057">setLeft</a>(<span class="keywordtype">float</span> left) { m_left = left; }</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a07c34bb6f649860176341b87a1da90e7">  193</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a07c34bb6f649860176341b87a1da90e7">setRight</a>(<span class="keywordtype">float</span> right) { m_size.width = right - m_left; }</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a6c26918ef93317ce10e03e265f149efe">  200</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a6c26918ef93317ce10e03e265f149efe">setTop</a>(<span class="keywordtype">float</span> top) { m_size.height = top - m_bottom; }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#ab2dea94befdb96b179ea951cda9a70c9">  207</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#ab2dea94befdb96b179ea951cda9a70c9">setBottom</a>(<span class="keywordtype">float</span> bottom) { m_bottom = bottom; }</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#add528770fbe6671551dac05bf85b172e">  213</a></span>&#160;        <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; <a class="code" href="class_sky_engine2d_1_1_rect.html#add528770fbe6671551dac05bf85b172e">getSize</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_size; }</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a707cad14b9bcdd995e138a222a482813">  219</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a707cad14b9bcdd995e138a222a482813">getWidth</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_size.width; }</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a709473900c6fc54029e8f3fa6d40a166">  225</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a709473900c6fc54029e8f3fa6d40a166">getHeight</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_size.height; }</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#abfba6e760949c23216c0c5dbcc56fff0">  232</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#abfba6e760949c23216c0c5dbcc56fff0">setSize</a>(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; size) { m_size = size; }</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div><div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a659f3f062b35869a446b46b0325352de">  239</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a659f3f062b35869a446b46b0325352de">setWidth</a>(<span class="keywordtype">float</span> w) { m_size.width = w; }</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_rect.html#a751f0030ce617696c049c0821fed7f5d">  246</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_rect.html#a751f0030ce617696c049c0821fed7f5d">setHeight</a>(<span class="keywordtype">float</span> h) { m_size.height = h; }</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        <span class="keywordtype">void</span> setBottomLeft(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; bottom_left);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        <span class="keywordtype">float</span> m_left;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <span class="keywordtype">float</span> m_bottom;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a> m_size;</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_sky_engine2d_1_1_rect.html">Rect</a> Zero;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    };</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;}</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="preprocessor">#endif // Rect_h__</span></div><div class="ttc" id="class_sky_engine2d_1_1_size_html"><div class="ttname"><a href="class_sky_engine2d_1_1_size.html">SkyEngine2d::Size</a></div><div class="ttdoc">尺寸</div><div class="ttdef"><b>Definition:</b> Size.h:29</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_add528770fbe6671551dac05bf85b172e"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#add528770fbe6671551dac05bf85b172e">SkyEngine2d::Rect::getSize</a></div><div class="ttdeci">const Size &amp; getSize() const</div><div class="ttdoc">获取矩形的尺寸</div><div class="ttdef"><b>Definition:</b> Rect.h:213</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a5c64f9f2dd9518afb2e86c2609239c90"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a5c64f9f2dd9518afb2e86c2609239c90">SkyEngine2d::Rect::getTop</a></div><div class="ttdeci">float getTop() const</div><div class="ttdoc">矩形顶部的y坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:149</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_aa582ce22e95cf069d31993a01bad1c8b"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#aa582ce22e95cf069d31993a01bad1c8b">SkyEngine2d::Rect::getRight</a></div><div class="ttdeci">float getRight() const</div><div class="ttdoc">矩形右边的x坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:143</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_line_html"><div class="ttname"><a href="class_sky_engine2d_1_1_line.html">SkyEngine2d::Line</a></div><div class="ttdef"><b>Definition:</b> Line.h:29</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html">SkyEngine2d::Rect</a></div><div class="ttdoc">矩形</div><div class="ttdef"><b>Definition:</b> Rect.h:33</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a709473900c6fc54029e8f3fa6d40a166"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a709473900c6fc54029e8f3fa6d40a166">SkyEngine2d::Rect::getHeight</a></div><div class="ttdeci">float getHeight() const</div><div class="ttdoc">获取矩形的高</div><div class="ttdef"><b>Definition:</b> Rect.h:225</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a1ff859dc3515f209d8e95cbecb431638"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a1ff859dc3515f209d8e95cbecb431638">SkyEngine2d::Rect::getTopLeft</a></div><div class="ttdeci">Vector2 getTopLeft() const</div><div class="ttdef"><b>Definition:</b> Rect.h:167</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a7524be9fdc3347959f5774f1aad31365"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a7524be9fdc3347959f5774f1aad31365">SkyEngine2d::Rect::getTopRight</a></div><div class="ttdeci">Vector2 getTopRight() const</div><div class="ttdoc">矩形右上角的坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:179</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a1dbd956c536722d8c6f595977ea5272d"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a1dbd956c536722d8c6f595977ea5272d">SkyEngine2d::Rect::getBottom</a></div><div class="ttdeci">float getBottom() const</div><div class="ttdoc">矩形底部的y坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:155</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_vector2_html"><div class="ttname"><a href="class_sky_engine2d_1_1_vector2.html">SkyEngine2d::Vector2</a></div><div class="ttdoc">2D向量</div><div class="ttdef"><b>Definition:</b> Vector.h:34</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_aa974b273803b0c331fba4ec79cfdc639"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#aa974b273803b0c331fba4ec79cfdc639">SkyEngine2d::Rect::getBottomRight</a></div><div class="ttdeci">Vector2 getBottomRight() const</div><div class="ttdoc">矩形右下角的坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:173</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a6c26918ef93317ce10e03e265f149efe"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a6c26918ef93317ce10e03e265f149efe">SkyEngine2d::Rect::setTop</a></div><div class="ttdeci">void setTop(float top)</div><div class="ttdoc">设置矩形的上边的y坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:200</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a9230d7720580dfcbb96558438283694f"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a9230d7720580dfcbb96558438283694f">SkyEngine2d::Rect::getLeft</a></div><div class="ttdeci">float getLeft() const</div><div class="ttdoc">矩形左边的x坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:137</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a07c34bb6f649860176341b87a1da90e7"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a07c34bb6f649860176341b87a1da90e7">SkyEngine2d::Rect::setRight</a></div><div class="ttdeci">void setRight(float right)</div><div class="ttdoc">设置矩形的右边的x坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:193</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_ab2dea94befdb96b179ea951cda9a70c9"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#ab2dea94befdb96b179ea951cda9a70c9">SkyEngine2d::Rect::setBottom</a></div><div class="ttdeci">void setBottom(float bottom)</div><div class="ttdoc">设置矩形的下边的y坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:207</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_ae97111130e08708f229d3f8c23be5057"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#ae97111130e08708f229d3f8c23be5057">SkyEngine2d::Rect::setLeft</a></div><div class="ttdeci">void setLeft(float left)</div><div class="ttdoc">设置矩形的左边的x坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:186</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a659f3f062b35869a446b46b0325352de"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a659f3f062b35869a446b46b0325352de">SkyEngine2d::Rect::setWidth</a></div><div class="ttdeci">void setWidth(float w)</div><div class="ttdoc">设置矩形的宽</div><div class="ttdef"><b>Definition:</b> Rect.h:239</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a751f0030ce617696c049c0821fed7f5d"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a751f0030ce617696c049c0821fed7f5d">SkyEngine2d::Rect::setHeight</a></div><div class="ttdeci">void setHeight(float h)</div><div class="ttdoc">设置矩形的高</div><div class="ttdef"><b>Definition:</b> Rect.h:246</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a707cad14b9bcdd995e138a222a482813"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a707cad14b9bcdd995e138a222a482813">SkyEngine2d::Rect::getWidth</a></div><div class="ttdeci">float getWidth() const</div><div class="ttdoc">获取矩形的宽</div><div class="ttdef"><b>Definition:</b> Rect.h:219</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_abfba6e760949c23216c0c5dbcc56fff0"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#abfba6e760949c23216c0c5dbcc56fff0">SkyEngine2d::Rect::setSize</a></div><div class="ttdeci">void setSize(const Size &amp;size)</div><div class="ttdoc">设置矩形的尺寸</div><div class="ttdef"><b>Definition:</b> Rect.h:232</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_rect_html_a4800f09e615e757cbdf8a68e3797fffc"><div class="ttname"><a href="class_sky_engine2d_1_1_rect.html#a4800f09e615e757cbdf8a68e3797fffc">SkyEngine2d::Rect::getBottomLeft</a></div><div class="ttdeci">Vector2 getBottomLeft() const</div><div class="ttdoc">矩形左下角的坐标</div><div class="ttdef"><b>Definition:</b> Rect.h:161</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
